Hitherto, David A. Patterson et al. of University of California at Berkeley have proposed a paper regarding the results of the evaluation by classifying into levels 1 to 5 with respect to a disk array apparatus in which a large amount of data is accessed to disks at a high speed and a redundancy of the data in case of a failure of the disk is realized ("ACM SIGMOD Conference", pages 109 to 116, Chicago, Ill., Jun. 1 to 3, 1988). The levels 1 to 5 to classify the disk array apparatus which has been proposed by David A. Patterson et al. are abbreviated to RAID (Redundant Arrays of Inexpensive Disks) 1 to 5. The RAID 1 to 5 will now be briefly explained hereinbelow.
RAID0
FIG. 1 shows a disk array apparatus having no redundancy of data. Although it is not included in the classification by the David A. Patterson, it is temporarily called RAID0. According to the disk array apparatus of RAID0, as shown in data A to I, a disk array control apparatus 10 merely distributes the data to disk apparatuses 31-1 to 32-3 on the basis of input/output requests from a host computer 18, respectively. There is no redundancy of data in case of a disk failure.
RAID1
As shown in FIG. 2, a disk array apparatus of RAID1 has a mirror disk apparatus 32-2 in which copies A' to C' of data A to C stored in the disk apparatus 32-1 have been stored. Although a use efficiency of the disk apparatus is low, the RAID1 has a low redundancy and can be realized by a simple control, so that it is widely spread.
RAID2
A disk array apparatus of RAID2 stripes (divides) the data on a bit or byte unit basis and reads or writes the data from/to the disk apparatuses. All of the striped data is physically recorded to the same sector in all of the disk apparatuses. As an error correction code, a hamming code produced from the data is used. In addition to the disk apparatus for data, the apparatus has another disk apparatus to record the hamming code. The failed disk apparatus is decided from the hamming code and the data is reconstructed. By providing the redundancy by the hamming code, even when the disk apparatus fails, correct data can be assured. However, it is not put into practical use yet because the use efficiency of the disk apparatus is bad.
RAID3
A disk array apparatus of RAID3 has a construction shown in FIG. 3. That is, as shown in FIG. 4, for example, data a, b, and c are divided into data a1 to a3, b1 to b3, and c1 to c3 on a bit or sector unit basis. Further, a parity P1 is calculated from the data a1 to a3. A parity P2 is calculated from the data b1 to b3. A parity P3 is calculated from the data c1 to c3. The disk apparatuses 32-1 to 32-4 in FIG. 3 are simultaneously accessed in parallel and the data is written. In the RAID3, the redundancy of the data is held by the parity. The data writing time can be reduced by the parallel processes of the divided data. It is necessary to execute the parallel seeking operations of all of the disk apparatuses 32-1 to 32-4 by the one writing or reading access operation. Therefore, although it is effective in case of continuously handling a large amount of data, in case of a transaction process such that a small amount of data is accessed at random, a high data transfer speed cannot be utilized and the efficiency deteriorates.
RAID4
As shown in FIG. 5, a disk array apparatus of RAID4 divides one data on a sector unit basis and writes to the same disk apparatuses. For example, when considering the disk apparatus 32-1, the data a is divided into sector data a1 to a4 and those four data are written. The parities are stored in the disk apparatus which has fixedly been determined. The parity P1 is calculated from the data a1, b1, and c1. The parity P2 is calculated from the data a2, b2, and c2. The parity P3 is calculated from the data a3, b3, and c3. The parity P4 is calculated from the data a4, b4, and c4. The data can be read out in parallel from the disk apparatuses 32-1 to 32-3. As for the reading of the data a to b, when considering the data a as an example, sectors 0 to 3 of the disk apparatus 32-1 are accessed and the sector data a1 to a4 are sequentially read out and synthesized. As for the data writing, after the data and parities before writing were read out, new parities are calculated and written, so that the accessing operations of total four times are necessary with respect to one writing operation. For instance, in case of updating (rewriting) the sector data a1 of the disk apparatus 32-1, the operations to read out old data (a1).sub.old at the updating location and an old parity (P1).sub.old of the disk apparatus 324 corresponding thereto and to obtain and write new data (a1).sub.new and a new parity (P1).sub.new which is matched therewith are needed in addition to the data writing operation for updating. On the other hand, when writing, since the disk apparatus 32-4 for parities is certainly accessed, it is impossible to simultaneously write data to a plurality of disk apparatuses. For example, even when the writing of the data a1 to the disk apparatus 32-1 and the writing of the data b2 to the disk apparatus 32-2 are simultaneously executed, since it is necessary to read out and calculate the parities P1 and P2 from the same disk apparatus 32-4 and to subsequently write them, they cannot be simultaneously written. Although RAID4 has been defined as mentioned above, since there is little advantage, a tendency to put into practical use is small at present.
RAID5
A disk array apparatus of RAID5 can perform the reading or writing operations in parallel because the disk apparatus for parities is not fixed. Namely, as shown in FIG. 6, the disk apparatuses in which the parities are set are different every sector. The parity P1 is calculated from the data a1, b1, and c1. The parity P2 is calculated from the a2, b2, and d2. The parity P3 is calculated from the data a3, c3, and d3. The parity P4 is calculated from the data b4, c4, and d4. As for the parallel reading/writing operations, for example, since the data a1 of the sector 0 of the disk apparatus 32-1 and the data b2 of the sector 1 of the disk apparatus 32-2 do not overlap because the parities P1 and P2 are set into the different disk apparatuses 32-4 and 32-3, so that the data can be simultaneously read or written. The overhead which needs the accessing operations of total four times upon writing is substantially the same as that in RAID4. As mentioned above, in RAID5, since a plurality of disk apparatuses are asynchronously accessed and the reading/writing operations can be executed, it is suitable for a transaction process in which a small amount of data is accessed at random. In the disk array apparatus as shown in RAID3 to RAID5, a combination of the disk apparatuses regarding the formation of the redundant information is called a rank. For example, in the case where there are (k) disk apparatuses for data recording and (m) disk apparatuses for recording the redundant information regarding the data, the (k+m) disk apparatuses are referred to as a rank.
In such conventional disk array apparatuses corresponding to RAID4 and RAID5, in case of rewriting and updating a part or all of the data stored in the disk apparatuses in the rank, it is also necessary to update the redundant information regarding the data to be updated. In this instance, in order to obtain new redundant information, the data before updating and the redundant information are necessary. It is now assumed that the parity data is used as redundant information, when the data of one disk apparatus in the rank of the disk array apparatus is updated, new parities can be calculated from the following equation (1). EQU Old data(+)old parity(+)new data=new parity (1)
where,(+)denotes the exclusive OR
As will be understood from the equation (1), upon updating of data, the data before updating and the redundant information must be read out from the disk apparatuses, respectively, before the updating data is written. There is, consequently, a problem such that it takes a long time for the data updating process than that of the ordinary disk apparatus by only the time which is required to read out the data before updating and the redundant information from the disk apparatus.
It is, therefore, an object of the invention to provide a disk array apparatus in which at least one of a plurality of data which are handled upon updating is stored into a cache memory and the disk access that is necessary to produce redundant information is efficiently executed.
On the other hand, in the conventional disk array apparatus, in the case where the power supply is stopped due to some causes during the data writing operation, in the conventional disk apparatus or the disk array apparatus of RAID1 to RAID3, the same writing operation can be also executed from the beginning after the recovery of the power source. In the disk array apparatuses of RAID4 and RAID5, however, it is not permitted that the same writing operation is executed again from the beginning after the recovery of the power source because of the following reasons. Upon writing of data of RAID4 and RAID5, as shown by the following equation, the exclusive OR of the data in a plurality of disk apparatuses is calculated and is set to a parity and is held into the disk apparatus for parities. EQU data a(+)data b(+) . . . =parity P
where,(+)denotes a symbol of exclusive OR
Storing locations of the data and parity are fixed into the specific disk apparatuses 32-1 to 32-4 as shown in FIG. 5 in case of RAID4. On the other hand, in RAID5, as shown in FIG. 6, the parities are distributed to the disk apparatuses 32-1 to 32-4, thereby preventing the concentration of the accesses to the special disk apparatuses by the parity reading/writing operation. Upon data reading of RAID4 an RAID5, since the data in the disk apparatuses 32-1 to 32-4 is not rewritten, the matching of the parities is held. Upon writing, however, the parities also need to be changed in accordance with the data. For example, when one old data (a1).sub.old in the disk apparatus 32-1 is rewritten to the new data (a1).sub.new, in order to obtain the matching of the parity P1, the calculation shown in the equation (1) is executed and the parity is updated, thereby enabling the matching of the parities of the whole data of the disk apparatuses to be held. As will be understood from the equation (1), in the data writing process, it is necessary to first read out the old data and old parity in the disk apparatus, and after that, the new data is written and the new parity is produced and written. When the power source is shut off during the writing of the new data or new parity, the location in which the data has actually been correctly written cannot be recognized and the matching of the parities is lost. When the same data writing process is again executed at the time of recovery of the power source in this state, the old data and old parity are read out from the disk apparatus in which the matching of the parity is not obtained, so that there is a problem such that the new parity which is not matched is produced and the writing operation is finished.
It is, therefore, an object of the invention to provide a disk array apparatus in which even when a shut-off of the power source occurs during the data writing process, the data writing process which was interrupted can be restarted and completed from the halfway after the recovery of the power source.